package com.sunyard.manage.service;

import com.sunyard.dal.bo.PaginationBO;
import com.sunyard.dal.bo.task.*;
import com.sunyard.dal.dto.znsTask.AuditTaskDetailDTO;
import com.sunyard.dal.dto.znsTask.OrgRoleDTO;
import com.sunyard.dal.dto.znsTask.TaskZNSDTO;
import com.sunyard.dal.entity.Terminal;
import com.sunyard.utils.Response.BaseResult;
import com.sunyard.utils.manage.DataGrid;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author jimin.duan
 * @Description TODO
 * @createTime 2022年06月24日 17:00:00
 */
public interface TaskService {

    /**
     * 添加任务
     */
    BaseResult addTask(TaskADDBO taskADDBO, HttpServletRequest request) throws Exception;

    BaseResult<DataGrid<TaskZNSDTO>> findTask(PaginationBO<TaskFindBO> taskFindBO,HttpServletRequest request) throws Exception;

    BaseResult<TaskADDBO> findById(String taskId);

    BaseResult deleteTask(TaskDeleteBO taskDelete, HttpServletRequest request);

    BaseResult assignmentAuditTask(TaskAuditBO taskAuditBO);

    BaseResult issuedTask(TaskissuedBO taskissued, HttpServletRequest request);

    BaseResult insertNewTask(TaskADDBO taskADDBO);

    BaseResult findPeopleByOrg(OrgBO orgBO);

    BaseResult findLockByOP(LockBO lock);


    BaseResult<DataGrid<TaskZNSDTO>> findTaskIssued(PaginationBO<TaskFindBOForInssued> taskFindBOForInssued, HttpServletRequest request);

    BaseResult auditTask(TaskCopyBO taskCopyBO, HttpServletRequest request);

    BaseResult<DataGrid<TaskZNSDTO>> taskListForLogin(PaginationBO<TaskListForLoginBO> taskListForLoginBO, HttpServletRequest request) throws Exception;

    void taskReviewExport(HttpServletResponse response, @RequestBody TaskListForLoginBO taskListForLoginBO, HttpServletRequest request);

    BaseResult<AuditTaskDetailDTO> auditTaskDetail(AuditTaskDetailBO auditTaskDetailBO);

    BaseResult findAllORG();

    BaseResult findBoxByOrg(LockBO lock);

    BaseResult findLockByBox(BoxBO boxBo);

    BaseResult openLock(OpenLockBO openLockBO);

    BaseResult findLockInfo(FindLockInfoBo f);

    BaseResult<List<TaskZNSDTO>> findTaskIssuedtwo(TaskFindBOForInssued taskFindBOForInssued);

    /**
     * @author wp
     * @Description:  根据机构查询场景关联的人员列表
     * @date 2022/10/13
     */
    BaseResult<List<OrgRoleDTO>> findOperatorByOrg(TaskSceOrgBO orgBO);

    void resetTask(Terminal ter);
}
